package com.lebang.medicalInquiry.constant;

/**
 * @program: LazyAssistant
 * @description: 错误类型枚举
 * @author: tony
 * @create: 2019-12-09 18:01
 **/
public enum ResponseEnum {

    /**
     * 错误类型
     */
    SUCCESS("200", "成功", "操作成功", true, null),
    PAY_SUCCESS("200", "支付成功", "操作成功", true, null),


    FAIL("506", "失败", "操作失败", false, null),
    PAY_FAIL("505", "支付失败", "操作失败", false, null),

    //用户相关 600-699
    USER_EXIST("601", "用户已存在", "用户已存在", false, null),
    PHONE_REGISTER("602", "手机号已被注册", "手机号已被注册", false, null),
    ERROR_UPDATE_INFO("603", "修改失败", "昵称和图片路径不能同时为空", false, null),
    LOST_OR_EXPIRE_TOKEN("604", "重新登录", "token缺失或过期，请重新登录", false, null),
    LOST_TOKEN("666", "重新登录", "token过期，请重新登录", false, null),
    LOST_PARAMS("605", "参数缺失", "缺少参数", false, null),
    REMOTE_LOGOUT("605", "异地登录踢出", "异地登录踢出", false, null),
    ERROR_PARAMS("606", "参数错误", "参数错误", false, null),
    ACCOUNT_NOT_EXIST("607", "账号不存在请注册", "账号不存在请注册", false, null),
    ERROR_NAME_PASSWORD("607", "用户名或密码错误", "用户名或密码错误", false, null),
    ACCOUNT_UNABLE("608", "账户不可用", "账户处于禁用状态", false, null),
    ACCOUNT_EXCEPTION("610", "账户不可用", "账户处于异常状态", false, null),
    LOGIN_REQUIRE_SMS("611", "登录需要验证码", "登录需要验证码", false, null),
    ERROR_NAME("612", "姓名为空", "姓名为空", false, null),
    ERROR_REQUEST_DATA("614", "请求用户数据异常", "请求用户数据异常", false, null),
    ERROR_USER_UPDATE_FAIL("615", "更新用户数据失败", "更新用户数据失败", false, null),
    ERROR_USER_DELETE_FAIL("616", "删除用户数据失败", "删除用户数据失败", false, null),
    ERROR_REGISTRE_ACOUNT_FAIL("617", "注册账号失败", "注册账号失败", false, null),

    ERROR_RATE_LIMIT("2002", "请求频繁", "请求频繁", false, null),
    UNEXCEPTION("800", "请求错误", "请求错误", false, null),

    ;


    private String code;

    private String name;

    private String memo;

    private Object data;

    private boolean result;

    ResponseEnum(String code, String name, String memo, boolean result, Object data) {
        this.code = code;
        this.name = name;
        this.memo = memo;
        this.result = result;
        this.data = data;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getMemo() {
        return memo;
    }

    public void setMemo(String memo) {
        this.memo = memo;
    }

    public boolean isResult() {
        return result;
    }

    public void setResult(boolean result) {
        this.result = result;
    }
}
